home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / mawk.zip / FIELD.H < prev    next >
C/C++ Source or Header  |  1991-04-07  |  1KB  |  66 lines

  1.  
  2. /********************************************
  3. field.h
  4. copyright 1991, Michael D. Brennan
  5.  
  6. This is a source file for mawk, an implementation of
  7. the Awk programming language as defined in
  8. Aho, Kernighan and Weinberger, The AWK Programming Language,
  9. Addison-Wesley, 1988.
  10.  
  11. See the accompaning file, LIMITATIONS, for restrictions
  12. regarding modification and redistribution of this
  13. program in source or binary form.
  14. ********************************************/
  15.  
  16. /* $Log:    field.h,v $
  17.  * Revision 2.1  91/04/08  08:23:03  brennan
  18.  * VERSION 0.97
  19.  * 
  20. */
  21.  
  22. /* field.h */
  23.  
  24.  
  25. #ifndef  FIELD_H
  26. #define  FIELD_H   1
  27.  
  28. void  PROTO( set_field0, (char *, unsigned) ) ;
  29. void  PROTO( split_field0, (void) ) ;
  30. int   PROTO( is_strnum, (char *, unsigned, double *) ) ;
  31. void  PROTO( field_assign, (int, CELL *) ) ;
  32. char *PROTO( is_string_split, (PTR , unsigned *) ) ;
  33.  
  34. #define   NF            (MAX_FIELD+1)
  35. #define   RS            (MAX_FIELD+2)
  36. #define   FS            (MAX_FIELD+3)
  37. #define   OFMT          (MAX_FIELD+4)
  38. #define   NUM_FIELDS    (MAX_FIELD+5)
  39.  
  40.  
  41. extern  CELL  field[NUM_FIELDS] ;
  42.  
  43. extern  int  nf ; /* shadows NF */
  44.  
  45. /* a shadow type for RS and FS */
  46. #define  SEP_SPACE      0
  47. #define  SEP_CHAR       1
  48. #define  SEP_STR        2
  49. #define  SEP_RE         3
  50.  
  51. typedef  struct {
  52. char  type ;
  53. char  c ;
  54. PTR ptr ; /* STRING* or RE machine* */
  55. } SEPARATOR ;
  56.  
  57. extern   SEPARATOR  rs_shadow  ;
  58. extern   CELL  fs_shadow ;
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. #endif   /* FIELD_H  */
  66.